/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.app.data.record.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 数据用户操作记录表Entity
 * @author zpp
 * @version 2020-02-04
 */
@Table(name="t_data_record", alias="a", columns={
		@Column(name="id", attrName="id", label="主键", isPK=true),
		@Column(name="data_id", attrName="dataId", label="数据源"),
		@Column(name="user_id", attrName="userId", label="用户id"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class AppDataRecord extends DataEntity<AppDataRecord> {
	
	private static final long serialVersionUID = 1L;
	private String dataId;		// 数据源
	private String userId;		// 用户id
	
	public AppDataRecord() {
		this(null);
	}

	public AppDataRecord(String id){
		super(id);
	}
	
	@Length(min=0, max=50, message="数据源长度不能超过 50 个字符")
	public String getDataId() {
		return dataId;
	}

	public void setDataId(String dataId) {
		this.dataId = dataId;
	}
	
	@Length(min=0, max=50, message="用户id长度不能超过 50 个字符")
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	
}